package com.ruoyi.common.entity.TransactionEntity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 优惠券兑换码管理对象 coupon_redeem_code
 * 
 * @author x
 * @date 2025-08-07
 */
public class CouponRedeemCode extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 兑换码 */
    @Excel(name = "兑换码")
    private String redeemCode;

    /** 关联优惠券ID */
    @Excel(name = "关联优惠券ID")
    private Long couponId;

    /** 兑换码总数量 */
    @Excel(name = "兑换码总数量")
    private Long totalCount;

    /** 优惠券剩余数量 */
    @Excel(name = "优惠券剩余数量")
    private Long availableQuantity;

    /** 开始兑换时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始兑换时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 兑换码过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "兑换码过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /** 优惠券 */
    @Excel(name = "优惠券")
    private CouponInfo couponInfo;

    /** 删除标志（0未删除，1已删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setRedeemCode(String redeemCode) 
    {
        this.redeemCode = redeemCode;
    }

    public String getRedeemCode() 
    {
        return redeemCode;
    }

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }

    public void setTotalCount(Long totalCount) 
    {
        this.totalCount = totalCount;
    }

    public Long getTotalCount() 
    {
        return totalCount;
    }

    public void setAvailableQuantity(Long availableQuantity) 
    {
        this.availableQuantity = availableQuantity;
    }

    public Long getAvailableQuantity() 
    {
        return availableQuantity;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public CouponInfo getCouponInfo() {
        return couponInfo;
    }

    public void setCouponInfo(CouponInfo couponInfo) {
        this.couponInfo = couponInfo;
    }


    @Override
    public String toString() {
        return "CouponRedeemCode{" +
                "id=" + id +
                ", redeemCode='" + redeemCode + '\'' +
                ", couponId=" + couponId +
                ", totalCount=" + totalCount +
                ", availableQuantity=" + availableQuantity +
                ", startTime=" + startTime +
                ", expireTime=" + expireTime +
                ", couponInfo=" + couponInfo +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
